using System;
using System.Collections.Generic;
using System.Text;

namespace RNChessBoard.RNChessRulesEngine.TestFixtures
{
    /// <summary>
    /// This class defines custom arrays for white pawn opening moves.
    /// </summary>
    /// <remarks>
    /// The strings for each move are structured in the following manner:
    /// "{white from}-{white to}/{white result}/{white move type}/
    /// {black from}-{black to}/{black result}/{black move type}"
    /// 
    /// To indicate the end of a game, ie. no more moves, the to/from string
    /// for either side may be replaced with "EOG", representing End Of Game.
    /// 
    /// {result} has the following expected values:
    /// "": Legal move, no immediate consequence
    /// "!": Illegal move
    /// "+": Move has placed opponent in check
    /// "++": Move has placed opponent in check mate
    /// 
    /// {move type} has the following expected values:
    /// "x": Capture
    /// "nc": Non-capturing move
    /// "O-O": King-side castle
    /// "O-O-O": Queen-side castle
    /// "xep": En-passant capture
    /// "!": Illegal move
    /// "^": Pawn promotion
    /// </remarks>
    class WhitePawnTestMoves
    {
        /// <summary>
        /// Replay of standard white pawn openings for each file (A-H) moving
        /// from second rank to third rank, and second rank to fourth rank.
        /// </summary>
        public static string[][] WhitePawnOpenings_Rank3_Rank4_Legal = new string[][]
            {
                new string[] { "A2-A3//nc/EOG//" },
                new string[] { "A2-A4//nc/EOG//" },
                new string[] { "B2-B3//nc/EOG//" },
                new string[] { "B2-B4//nc/EOG//" },
                new string[] { "C2-C3//nc/EOG//" },
                new string[] { "C2-C4//nc/EOG//" },
                new string[] { "D2-D3//nc/EOG//" },
                new string[] { "D2-D4//nc/EOG//" },
                new string[] { "E2-E3//nc/EOG//" },
                new string[] { "E2-E4//nc/EOG//" },
                new string[] { "F2-F3//nc/EOG//" },
                new string[] { "F2-F4//nc/EOG//" },
                new string[] { "G2-G3//nc/EOG//" },
                new string[] { "G2-G4//nc/EOG//" },
                new string[] { "H2-H3//nc/EOG//" },
                new string[] { "H2-H4//nc/EOG//" }
            };

        /// <summary>
        /// Replay of illegal white pawn openings from second rank to fifth rank.
        /// </summary>
        public static string[][] WhitePawnOpenings_Rank5_Illegal = new string[][]
            {
                new string[] { "A2-A5/!/!/EOG//" },
                new string[] { "B2-B5/!/!/EOG//" },
                new string[] { "C2-C5/!/!/EOG//" },
                new string[] { "D2-D5/!/!/EOG//" },
                new string[] { "E2-E5/!/!/EOG//" },
                new string[] { "F2-F5/!/!/EOG//" },
                new string[] { "G2-G5/!/!/EOG//" },
                new string[] { "H2-H5/!/!/EOG//" },
            };

        /// <summary>
        /// Replay of illegal white pawn openings from second rank to third rank
        /// diagonally.
        /// </summary>
        public static string[][] WhitePawnOpenings_Rank3Diagonal_Illegal = new string[][]
            {
                new string[] {"A2-B3/!/!/EOG//"},
                new string[] {"B2-A3/!/!/EOG//"},
                new string[] {"B2-C3/!/!/EOG//"},
                new string[] {"C2-B3/!/!/EOG//"},
                new string[] {"C2-D3/!/!/EOG//"},
                new string[] {"D2-C3/!/!/EOG//"},
                new string[] {"D2-E3/!/!/EOG//"},
                new string[] {"E2-D3/!/!/EOG//"},
                new string[] {"E2-F3/!/!/EOG//"},
                new string[] {"F2-E3/!/!/EOG//"},
                new string[] {"F2-G3/!/!/EOG//"},
                new string[] {"G2-F3/!/!/EOG//"},
                new string[] {"G2-H3/!/!/EOG//"},
                new string[] {"H2-G3/!/!/EOG//"}
            };

        public static string[][] TestBattery_Legal = new string[][]
            {
                new string[] {"D2-D4//nc/G8-F6//nc",
                "G1-F3//nc/C7-C5//nc",
                "D4-D5//nc/D7-D6//nc",
                "C2-C4//nc/G7-G6//nc",
                "B1-C3//nc/F8-G7//nc",
                "EOG///EOG//"},
                
                new string[] {"D2-D4//nc/G8-F6//nc",
                "G1-F3//nc/C7-C5//nc",
                "D4-D5//nc/D7-D6//nc",
                "C2-C4//nc/G7-G6//nc",
                "B1-C3//nc/F8-G7//nc",
                "EOG///EOG//"},
                
                new string[] {"D2-D4//nc/G8-F6//nc",
                "G1-F3//nc/C7-C5//nc",
                "D4-D5//nc/D7-D6//nc",
                "C2-C4//nc/G7-G6//nc",
                "B1-C3//nc/F8-G7//nc",
                "EOG///EOG//"}
            };
    }
}
